This invention relates to a system for measuring the dimensions of boxes or other cuboid objects. In particular, the invention relates to a system which measures the dimensions of objects from images of the objects captured by digital cameras. The invention has particular application in measuring the dimensions of boxes or similar objects travelling along a conveyor.
It is sometimes desirable to be able to quickly and automatically measure the dimensions of cuboid objects. For example, courier and shipping companies are called upon to deliver very large numbers of cuboid boxes having various dimensions. It is desirable to be able to measure dimensions of the boxes on the fly to permit segregating the boxes by size; billing based upon size; monitoring the total volume of boxes shipped, or the like. The large number of boxes being shipped makes it difficult to make accurate measurements because very little time is available for each measurement. Further difficulties are caused by the fact that it is generally not desirable to require that boxes be singulated. Typically it is desirable to make measurements of boxes in a single randomly-arranged layer of boxes being carried along a conveyor belt.
Some existing systems place a digital camera above a box to be measured and project a line of light on an upper surface of the box. The line is projected onto the box from a different direction than the line of sight to the camera so that the apparent position of the projected line depends upon the height of the box above a reference surface, such as a conveyor belt on which the box is sitting. An example of such a system is the model DM3000 dimensioning system available from ACCU-SORT SYSTEMS INC. of Telford Pa., USA. Such single lens and single line systems must measure the speed of the conveyor belt in order to complete the dimension determinations. Often an electromechanical odometer or the like is coupled to the conveyor belt for use in measuring the conveyor belt""s speed.
This prior art approach has a number of disadvantages. Foremost among these is that the accuracy of the height measurement depends upon the projector which generates the line of light being absolutely rigidly mounted with respect to the camera. Height measurements will be inaccurate if the projector moves or vibrates relative to the camera so that the line of light is displaced to one side or the other in the camera""s field of view. This extra displacement from the calibrated normal state could lead to inaccurate measurements, either too small or too large depending on the direction of movement of the projector. To obtain the most accurate results the distance between the camera and projector should be large. This makes it more difficult and expensive to maintain the desired rigidity.
The length and width of the box may be determined from the speed at which the box passes the system. Boxes must be singulated.
There is a need for cost effective methods and systems for measuring the dimensions of objects, such as boxes, which avoid the disadvantages of currently available systems.
This invention provides methods and systems for measuring the dimensions of cuboid objects. The methods and systems determine heights of the objects above a known plane by projecting light patterns onto top surfaces of one or more objects, obtaining images of the projected patterns at two spaced apart cameras, and determining the heights of the projected patterns by triangulation. The invention facilitates the provision of apparatus for accurately and automatically measuring substantially cuboid objects which is self-contained and robust to external interferences.
Accordingly, one aspect of the invention provides a method for measuring dimensions of cuboid objects. The method comprises: providing a cuboid object having a first face in a known plane; projecting a line of light onto a second face of the object, the second face opposed to the first face; obtaining at first and second spaced apart cameras first and second images of the line of light; and, determining a distance between the line of light and the first plane from the first and second images by triangulation.
In preferred embodiments of the invention, a speed of motion of the objects is determined by using an optical flow technique. Preferably a third digital camera obtains a series of images of the object from which the speed of the object is determined. The speed determination may comprise acquiring first, second and third images of the object, the second image including points corresponding to at least a portion of the line of light; determining a correlation between the first and third images; and measuring a displacement between points on the object in the first and third images corresponding to the line of light in the second image. In preferred embodiments, the method includes transforming the images produced by the third camera so that the apparent optical axis of the third camera is perpendicular to a plane of a top surface of the object prior to determining a correlation between the first and third images. The first second and third images are preferably images in a stream of images.
Another aspect of the invention provides a system for measuring dimensions of cuboid objects. The system comprises: a camera assembly comprising first and second spaced apart digital cameras having a common field of view, the digital cameras rigidly coupled to one another; and, a projector spaced apart from the camera assembly, the projector mounted to project a line of light on an object in the field of view of the cameras. A distance d between the first and second cameras is substantially less than a distance x between the camera assembly and the projector. The projector is not necessarily rigidly affixed to the camera assembly.
Further features and advantages of the invention are described below.